package com.whmskj.xjlhbc.mobile.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 移动端首页数据VO
 */
@Data
@Schema(description = "移动端首页数据")
public class MobileHomeDataVO {

    @Schema(description = "产量完成情况")
    private ProductionCompletionVO productionCompletion;

    @Schema(description = "用电情况")
    private ElectricityUsageVO electricityUsage;

    /**
     * 产量完成情况VO
     */
    @Data
    @Schema(description = "产量完成情况")
    public static class ProductionCompletionVO {
        
        @Schema(description = "整经数据")
        private ProcessDataVO 整经;
        
        @Schema(description = "浆纱数据")
        private ProcessDataVO 浆纱;
        
        @Schema(description = "织布数据")
        private ProcessDataVO 织布;
        
        @Schema(description = "整理数据")
        private ProcessDataVO 整理;
    }

    /**
     * 用电情况VO
     */
    @Data
    @Schema(description = "用电情况")
    public static class ElectricityUsageVO {
        
        @Schema(description = "总用电数据")
        private WorkshopDataVO 总用电;
        
        @Schema(description = "准整车间数据")
        private WorkshopDataVO 准整车间;
        
        @Schema(description = "织布车间数据")
        private WorkshopDataVO 织布车间;
    }

    /**
     * 工序数据VO
     */
    @Data
    @Schema(description = "工序数据")
    public static class ProcessDataVO {
        
        @Schema(description = "计划产量")
        private String plannedProduction;
        
        @Schema(description = "完成产量")
        private String actualProduction;
        
        @Schema(description = "完成比例")
        private String completionRate;
    }

    /**
     * 车间数据VO
     */
    @Data
    @Schema(description = "车间数据")
    public static class WorkshopDataVO {
        
        @Schema(description = "总电耗")
        private String totalConsumption;
        
        @Schema(description = "总电费")
        private String totalCost;
        
        @Schema(description = "万米用电")
        private String electricityPerMeter;
    }

    /**
     * 趋势数据VO
     */
    @Data
    @Schema(description = "趋势数据")
    public static class TrendDataVO {
        
        @Schema(description = "日期列表")
        private List<String> dates;
        
        @Schema(description = "数据列表")
        private List<Double> data;
    }

    /**
     * 产量趋势数据VO
     */
    @Data
    @Schema(description = "产量趋势数据")
    public static class ProductionTrendVO {
        
        @Schema(description = "日期列表")
        private List<String> dates;
        
        @Schema(description = "计划产量数据")
        private List<Double> plannedProduction;
        
        @Schema(description = "实际产量数据")
        private List<Double> actualProduction;
    }
}
